<div style="margin: 10pt 10pt 10pt 10pt">
<% if @other_groups.nil? %>
	<%= link_to 'New group', new_group_path %>
<% end %>
<h1>Listing groups</h1>
<table>
    <% for group in @groups %>
    <tr>
        <td><%= link_to group.name, group %></td>
    </tr>
    <% end %>
</table>
<% if not @other_groups.nil? %>
	<br />
	<% form_tag "/members/#{@member_id}/groups" do %>
		<%= select "post", "group_id", @other_groups %>
		<%= submit_tag "Join" %>
	<% end %>
<% end %>
<br/>
</div>